//package com.yc.mapper;
//
//import com.yc.bean.Order;
//import org.apache.ibatis.annotations.*;
//
//import java.util.List;
//
//@Mapper
//public interface OrderMapper {
//
//    @Insert("INSERT INTO orders(id, userId, addressId, paymentType, orderStatus, updateTime, remark) " +
//            "VALUES(#{id}, #{userId}, #{addressId}, #{paymentType}, 1, NOW(), #{remark})")
//    void insertOrder(Order order);
//
//    @Select("SELECT * FROM orders WHERE userId = #{userId} ORDER BY updateTime DESC")
//    List<Order> findOrdersByUserId(Long userId);
//
//    @Select("SELECT * FROM orders WHERE id = #{orderId}")
//    Order findOrderById(Long orderId);
//
//    @Update("UPDATE orders SET orderStatus = #{orderStatus}, updateTime = NOW() WHERE id = #{orderId}")
//    int updateOrderStatus(@Param("orderId") Long orderId, @Param("orderStatus") int orderStatus);
//
//    @Update("UPDATE orders SET paymentType = #{paymentType}, paymentTime = NOW(), orderStatus = 2, updateTime = NOW() WHERE id = #{orderId}")
//    int payOrder(@Param("orderId") Long orderId, @Param("paymentType") Byte paymentType);
//}
